package cn.edu.scau.cmi.liangzijian.client;

import cn.edu.scau.cmi.liangzijian.decorator.MyList;
import cn.edu.scau.cmi.liangzijian.decorator.OriginalList;
import cn.edu.scau.cmi.liangzijian.decorator.Person;
import cn.edu.scau.cmi.liangzijian.decorator.PersonList;

public class DecoratorClient {
	public static void main(String[] args) {
		Person p1 = new Person();
		Person p2 = new Person();
		Person p3 = new Person();
		Person p4 = new Person();
		
		p1.setAge(15);
		p1.setIdCard("0001");
		
		p2.setName("jack");
		p2.setIdCard("0002");
		
		p3.setName("Tom");
		p3.setAge(20);
		
		p4.setName("Mike");
		p4.setAge(18);
		p4.setIdCard("0003");
		
		MyList l = new OriginalList();
		MyList pl = new PersonList(l);
		pl.add(p1);
		pl.add(p2);
		pl.add(p3);
		pl.add(p4);
		
		pl.list();
	}
	
}
